package com.liuya.safe.model;

import com.liuya.base.BaseModel;

/**
 * A decision rule. A (decision) privilege can contain many rules. A rule
 * descibes privilege/userCategory/businessData/ relationship.
 * 
 * Unique index(privilegeId, userCategoryId, businessDataId). For a certain
 * privilege, a certain usercategory may be refed by many businessdata.
 */
public class SafeDecisionEntitlement extends BaseModel {
	public static final String DENY = "deny";
	public static final String PERMIT = "permit";
	/**
	 * privilege id, it must be leaf node
	 */
	private String privilegeId;
	private String userCategoryId;
	private String businessDataId;
	private String id;
	private String effect;
	private String denyReason;
	private SafeUserCategory userCategory;
	private SafeBusinessData businessData;

	public String getPrivilegeId() {
		return privilegeId;
	}

	public void setPrivilegeId(String privilegeId) {
		this.privilegeId = privilegeId;
	}

	public String getUserCategoryId() {
		return userCategoryId;
	}

	public void setUserCategoryId(String userCategoryId) {
		this.userCategoryId = userCategoryId;
	}

	public String getBusinessDataId() {
		return businessDataId;
	}

	public void setBusinessDataId(String businessDataId) {
		this.businessDataId = businessDataId;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getEffect() {
		return effect;
	}

	public void setEffect(String effect) {
		this.effect = effect;
	}

	public String getDenyReason() {
		return denyReason;
	}

	public void setDenyReason(String denyReason) {
		this.denyReason = denyReason;
	}

	public SafeUserCategory getUserCategory() {
		return userCategory;
	}

	public void setUserCategory(SafeUserCategory userCategory) {
		this.userCategory = userCategory;
	}

	public SafeBusinessData getBusinessData() {
		return businessData;
	}

	public void setBusinessData(SafeBusinessData businessData) {
		this.businessData = businessData;
	}
}
